package org.fanximall.erp.product.application.convert;

import org.fanximall.erp.product.application.req.CategorySaveCommand;
import org.fanximall.erp.product.application.req.LeafCategorySaveCommand;
import org.fanximall.erp.product.application.resp.CategoryTreeRespDTO;
import org.fanximall.erp.product.domain.dto.CategoryTreeModel;
import org.fanximall.erp.product.domain.model.ProductCategoryModel;
import org.fanximall.erp.product.domain.model.ProductLeafCategoryModel;
import org.fanximall.erp.product.infrastructure.dao.entity.ProductCategoryDO;
import org.mapstruct.Mapper;

import java.util.List;

/**
 * @author :  william
 * @version :  V1.0  created in 2024/5/6
 */
@Mapper(componentModel = "spring")
public interface CategoryConvert {


    ProductCategoryModel productCategoryModelConvert(CategorySaveCommand categorySaveCommand);


    ProductLeafCategoryModel productLeafCategoryModelConvert(LeafCategorySaveCommand leafCategorySaveCommand);


    List<CategoryTreeRespDTO> treeDefinitionModelBuildListConvert(List<ProductCategoryModel> productCategoryModels);

}
